//
//  Bridge.swift
//  test-ios
//
//  Created by wyz5204 on 2023/4/1.
//

import Foundation
import GRDB
import SwiftyUserDefaults

public protocol Entity : Codable {
    init()
}

public protocol DBEntity : Codable, FetchableRecord, MutablePersistableRecord {
    init()
}


open class DBBridge<Model : Entity , DBModel : DBEntity>{
    
    required public init() { }
    
    open func fill(_ entity: inout Model, fromEntry: DBModel) {
        fatalError("Abstact method")
    }
    
    open func fill(_ entry: inout DBModel, fromEntity: Model) {
        fatalError("Abstact method")
    }
}
